package com.nengchuan.kbms.dfs.controller;


import com.nengchuan.kbms.dfs.entity.dto.OptionDTO;
import com.nengchuan.kbms.dfs.service.PermissionPriorityService;
import com.nengchuan.model.model.WrappedResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 通用 前端控制器
 * </p>
 *
 * @author abe
 * @since 2020-04-09
 */
@RestController
@RequestMapping("/common")
public class CommonController {

    @Autowired
    private PermissionPriorityService permissionPriorityService;

    @GetMapping("/select/permission")
    @ApiOperation(value = "下拉列表-权限")
    public WrappedResult<List<OptionDTO>> selectPermission() {
        return WrappedResult.success(permissionPriorityService.listSelect());
    }

}
